<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>vue01</title>
</head>
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
<body>
    <div id="id-1">{{message}}</div>
    <div id="id-2">
        <span v-bind:title="message">鼠标悬停查看显示信息!</span>
    </div>
    <!-- 创建一个vue实例 -->
        <!-- 每个vue应用都是通过创建一个新的vue实例开始的  -->
        <div id="id-3"></div>
    <script>
       var app1 = new Vue({
           el:'#id-1',
           data: {
               message:'hello webpack'
           }
       })
       var app2 = new Vue({
           el:'#id-2',
           data:{
            message: `页面加载于  ${ new Date().toLocaleString()}皮皮虾`
           }
       })
       var data = {data:a}
       var vm = new Vue({
           el:'#id3',
           data:data
       })
       vm.$data === data 
       vm.$el = document.getElementsByTagName('#id-3')

       // $watch是一个实例方法
       vm.$watch('a', function(newValue,oldValue) {

       })
    </script>
</body>
</html>